{
    //声明日期
    let now=new Date();
    console.log('now',now);
}


{
    //传一个字符串日期
    let now=new Date("2015-01-02");
    let [year,month,day]=[now.getFullYear(),now.getMonth()+1,now.getDate()]
    console.log('now',now);
    console.log('year',year);
    console.log('month',month);
    console.log('day',day);
}
{
    var year = da.getFullYear()+'年';
    var month = da.getMonth()+1+'月';//月从0开始
    var date = da.getDate()+'日';
    console.log(now.getDay());//星期几
    console.log(now.getHours());
    console.log(now.getMinutes());
    console.log(now.getSeconds());
    console.log(now.getMilliseconds());
    Math.floor((now.getMonth()+3)/3);//季度
}
{
    //写一个时间格式化函数
}